import 'package:flutter/material.dart';
import 'package:flutter_eve_plugin/constants/font_family.dart';
import 'package:flutter_eve_plugin/constants/font_weight.dart';
import 'package:flutter_eve_plugin/utils/image_util.dart';
import 'package:flutter_eve_plugin/utils/screen_util.dart';

class ArchivesTopWidget extends StatelessWidget {
  const ArchivesTopWidget({
    Key key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: setRatio(375),
      height: setRatio(181),
      child: Stack(
        overflow: Overflow.visible,
        children: <Widget>[
          Positioned(
            bottom: 0,
            child: Container(
              width: setRatio(375),
              height: setRatio(141),
              decoration: BoxDecoration(
                  image: DecorationImage(
                      image: AssetImage(imageUtilYeXiu(
                          'archives/icon_archivers_top_bg@3x')))),
              child: Padding(
                padding: EdgeInsets.only(left: setRatio(52)),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    Row(
                      mainAxisAlignment: MainAxisAlignment.start,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: <Widget>[
                        Text(
                          '君莫笑',
                          style: TextStyle(
                              shadows: [
                                BoxShadow(
                                    color: Color(0x47000000),
                                    offset: Offset(0, setRatio(2)),
                                    blurRadius: setRatio(2))
                              ],
                              decoration: TextDecoration.none,
                              fontFamily: FontFamily.PMZD,
                              fontSize: setTextSp(25),
                              color: Color(0xFFFFFFFF)),
                        ),
                        SizedBox(
                          width: setRatio(4),
                        ),
                        Image.asset(
                          imageUtilYeXiu('checkpoint/icon_level_s@3x'),
                          width: setRatio(25),
                          height: setRatio(26),
                        )
                      ],
                    ),
                    Container(
                        width: setRatio(74),
                        height: setRatio(21),
                        margin: EdgeInsets.only(top: setRatio(7)),
                        decoration: BoxDecoration(
                            image: DecorationImage(
                                image: AssetImage(imageUtilYeXiu(
                                    'archives/icon_archivers_top_title_bg@3x')))),
                        child: Center(
                          child: Text(
                            '职业: 散人',
                            style: TextStyle(
                                decoration: TextDecoration.none,
                                fontFamily: FontFamily.PINGFANG,
                                fontWeight: FontWeightCustom.PF_Medium,
                                fontSize: setTextSp(11),
                                color: Color(0xFFFFFFFF)),
                          ),
                        ))
                  ],
                ),
              ),
            ),
          ),
          Positioned(
            bottom: 0,
            right: setRatio(40),
            child: Image.asset(
              imageUtilYeXiu('archives/icon_archivers_role@3x'),
              width: setRatio(165),
              height: setRatio(170),
            ),
          )
        ],
      ),
    );
  }
}
